import 'package:flutter/material.dart';
import 'github_api.dart';
import 'search_page.dart';

/// (Github SearchApp) A Rxdart Demo with bloc design patten
/// origin from: https://github.com/ReactiveX/rxdart/tree/master/example/flutter/github_search
///
class MyApp extends StatefulWidget {
  final GithubApi api = GithubApi();

  @override
  _RxDartAppState createState() => _RxDartAppState();
}

class _RxDartAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'RxDart Github Search',
      theme: ThemeData(
        brightness: Brightness.dark,
        primarySwatch: Colors.grey,
      ),
      home: SearchPage(api: widget.api),
    );
  }
}
